#1 超时
class Solution:
    def isPail(self , head ):
        # write code here
        p=head
        nums=[]
        while p :
           nums.append(p.val)
           p=p.next
        return nums==nums[::-1]
#栈 超时
class Solution:
    def isPail(self , head ):
        # write code here
        cur = head
        stack = []
        while cur:
            if stack and stack[-1] == cur.val:
                stack.pop()
            stack.append(cur.val)
            cur = cur.next
        return stack == []
# 快慢指针+ 反转链表
fast = head
        slow = head
        while fast and fast.next:
            fast = fast.next.next
            slow = slow.next
        list2 = slow
        p0 = None
        p1 = list2
        while p1:
            p2 = p1.next
            p1.next = p0
            p0 = p1
            p1 = p2
        new = p0
        while new:
            if new.val == head.val:
                new = new.next
                head = head.next
            else:
                return False
        return True
# 暴力 转成数组直接比
while True:
    try:
        x=input()[1:-1].split(',')
        end=len(x)-1
        begin=0
        while end>begin:
            if x[begin]==x[end]:
                begin+=1
                end-=1
            else:
                print("false")
                break
        else:
            print("true")
    except:
        break